//
//  UserInfoTableViewCell.m
//  RoadMaintain
//
//  Created by 岳学坤 on 2017/4/25.
//  Copyright © 2017年 岳学坤. All rights reserved.
//

#import "UserInfoTableViewCell.h"

@implementation UserInfoTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        self.titleLab = [[UILabel alloc]init];
        self.titleLab.textColor = Black_Color;
        self.titleLab.font = [UIFont systemFontOfSize:15*ZitiRate];
        [self.contentView addSubview:self.titleLab];
        [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(15*WidthRate);
            make.top.mas_equalTo(0);
            make.bottom.mas_equalTo(0);
            make.width.mas_equalTo(130*WidthRate);
        }];
        
        self.img = [[UIImageView alloc]init];
        [self.contentView addSubview:self.img];
        [self.img mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.mas_equalTo(0);
            make.right.mas_equalTo(-5*WidthRate);
            make.width.mas_equalTo(20*WidthRate);
            make.height.mas_equalTo(25*WidthRate);
        }];
        
        self.contentLab = [[UILabel alloc]init];
        self.contentLab.textColor = Gray_Color;
        self.contentLab.font = [UIFont systemFontOfSize:13*ZitiRate];
        self.contentLab.textAlignment = 2;
        [self.contentView addSubview:self.contentLab];
        [self.contentLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(0);
            make.bottom.mas_equalTo(0);
            make.left.equalTo(self.titleLab.mas_right).offset(0);
            make.right.mas_equalTo(-15*WidthRate);
        }];
        
        UIView *line = [[UIView alloc]init];
        line.backgroundColor = Line_Color;
        [self.contentView addSubview:line];
        [line mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.mas_equalTo(0);
            make.height.mas_equalTo(1);
            make.left.mas_equalTo(0);
            make.right.mas_equalTo(0);
        }];
    }
    return self;
}

@end
